package com.gitee.source

import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment,_}

/*
  接收node01:9999的数据, 核心方法SocketTextStream()
 */
object SourceSocketTest {
  def main(args: Array[String]): Unit = {
    val senv: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment
    val data: DataStream[String] = senv.socketTextStream("node01",9999,'\n',5)
    data.print()
    senv.execute()
  }

}
